<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html">

	<h2>Liste clients</h2>

	<h:dataTable value="#{clientBean.clients}" border="1" var="client">

		<h:column>
			<f:facet name="header">id</f:facet>
    		#{client.id}
    	</h:column>

		<h:column>
			<f:facet name="header">Nom</f:facet>
    		#{client.nom}
    	</h:column>

		<h:column>
			<f:facet name="header">Prénom</f:facet>
    		#{client.prenom}
    	</h:column>

		<h:column>
			<f:facet name="header">Modifier</f:facet>
			<h:form>
				<h:commandLink action="#{clientBean.modifierClientForm(client.id)}" value="Modifier" />
			</h:form>
			
			<!-- <h:link outcome="modifierClientForm.xhtml" value="Modifier">
				<f:param name="idClient" value="#{client.id}" />
			</h:link> -->
		</h:column>

		<h:column>
			<f:facet name="header">Supprimer</f:facet>
			<h:form>
				<!-- <s:link view="?" value="Supprimer" >
					<f:param name="idClient" value="#{client.id}" />
				</s:link> -->
				<h:commandLink action="#{clientBean.supprimerClient(client.id)}" value="Supprimer">
					<!-- <f:setPropertyActionListener target="#{clientBean.idClient}" value="#{client.id}" /> -->
				</h:commandLink>
			</h:form>
		</h:column>

	</h:dataTable>

</ui:composition>